package com.ruoyi.shop.good.goods.service.impl;

import com.ruoyi.mall.common.domain.DtsGoodsProduct;
import com.ruoyi.mall.common.mapper.DtsGoodsProductMapper;
import com.ruoyi.shop.good.goods.service.DtsGoodsProductService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * @Description TODO
 * @Author 李琪
 * @Date 2025/5/12 10:40
 **/
@Service
public class DtsGoodsProductServiceImpl implements DtsGoodsProductService {

    @Autowired
    private DtsGoodsProductMapper dtsGoodsProductMapper;

    @Override
    public List<DtsGoodsProduct> selectGoodsProductCountByGoodsId(int goodsId) {
        return dtsGoodsProductMapper.selectGoodsProductCountByGoodsId(goodsId);
    }

    @Override
    public int insertGoodsProduct(List<DtsGoodsProduct> dtsGoodsProduct) {
        return dtsGoodsProductMapper.insertGoodsProduct(dtsGoodsProduct);
    }

    @Override
    public int selectGoodsProductStock(int goodsId) {
        return dtsGoodsProductMapper.selectGoodsProductStock(goodsId);
    }

    @Override
    public DtsGoodsProduct seelctXiangqing(Long id) {
        return dtsGoodsProductMapper.seelctXiangqing(id);
    }
}
